curl --request POST \
--url https://api.hyperline.co/v1/customers/{id}/credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "itm_3kXODDF42QXtnL",
"name": "Credit name",
"current_balance": 2000,
"low_count_threshold": 10,
"auto_topup": {
"credit_count": 32,
"amount_excluding_tax": 2000,
"price_id": "<string>"
}
}
'{
"product_id": "itm_3kXODDF42QXtnL",
"customer_id": "cus_Typ0px2W0aiEtl",
"name": "Credit name",
"current_balance": 2000,
"low_count_threshold": 10,
"last_refreshed_at": "2025-11-23T09:00:01.860Z",
"auto_topup": {
"credit_count": 32,
"amount_excluding_tax": null,
"price_id": null
},
"created_at": "2025-10-12T07:00:01.860Z",
"updated_at": "2025-10-13T10:00:01.860Z"
}Create a credit entity for a given product with an optional balance.
curl --request POST \
--url https://api.hyperline.co/v1/customers/{id}/credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "itm_3kXODDF42QXtnL",
"name": "Credit name",
"current_balance": 2000,
"low_count_threshold": 10,
"auto_topup": {
"credit_count": 32,
"amount_excluding_tax": 2000,
"price_id": "<string>"
}
}
'{
"product_id": "itm_3kXODDF42QXtnL",
"customer_id": "cus_Typ0px2W0aiEtl",
"name": "Credit name",
"current_balance": 2000,
"low_count_threshold": 10,
"last_refreshed_at": "2025-11-23T09:00:01.860Z",
"auto_topup": {
"credit_count": 32,
"amount_excluding_tax": null,
"price_id": null
},
"created_at": "2025-10-12T07:00:01.860Z",
"updated_at": "2025-10-13T10:00:01.860Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Create credit payload
Credit product ID.
"itm_3kXODDF42QXtnL"
Credit name.
"Credit name"
Current credit balance.
2000
Value indicating a low threshold.
10
Auto top-up options.
Show child attributes
Credit created
Credit product ID.
"itm_3kXODDF42QXtnL"
Customer ID related to the credit.
"cus_Typ0px2W0aiEtl"
Credit name.
"Credit name"
Current credit balance.
2000
Value indicating a low threshold.
10
Auto top-up options.
Show child attributes
Was this page helpful?